import Taro from "@tarojs/taro"
import { defineStore } from "pinia"
import { computed, ref } from "vue"

export const useUserStore = defineStore('user', () => {
    const token = ref(Taro.getStorageSync('token'))
    const isLogin = computed(() => {
        return !!token.value
    })
    // const isLogin = !!Taro.getStorageSync('token')
    return { isLogin }
})